package com.bridgeintelligent.tag.mapper;

import com.bridgeintelligent.tag.webserver.dim.mgmt.api.entity.ShareRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @description
 * @author: grp 2020-12-29 18:08
 **/
@Mapper
public interface ShareMapper {
    @Select("SELECT user_id FROM TAG_SHARE_RELATION where dim_id = #{dimId}")
    List<String> findByDimId(@Param("dimId")String dimId);

    int save(@Param("relations")List<ShareRelation> relation);

    int deleteByDimId(@Param("dimId")String dimId);
}
